package com.cdut.hwadeefsc.mapper;

import com.cdut.hwadeefsc.entity.activityPhotos;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
* @author 1
* @description 针对表【activity_photos(学生活动图片表)】的数据库操作Mapper
* @createDate 2025-09-15 10:44:08
* @Entity com.cdut.hwadeefsc.entity.activity_photos
*/
public interface activityPhotosMapper extends BaseMapper<activityPhotos> {
    @Insert("INSERT INTO activity_photos(activity_id, photo_url) VALUES(#{activityId}, #{photoUrl})")
    int insert(activityPhotos photo);

    @Select("SELECT * FROM activity_photos WHERE activity_id = #{activityId}")
    List<activityPhotos> selectByActivityId(@Param("activityId") Long activityId);
}




